var configure={
    init:function(){
        var self=this;
        self.shadeDiv = $("#shade-div");
        self.bindEvents();
        self.loadTree()
    },
    bindEvents:function(){
        var self=this;
        //        全选
        $.checkAll("inputItem1")
        $.checkAll("inputItem2")
        $("#findGroup").textClean()
        //        选择用户
        $(".addUser").click(function(){
            self.shadeDiv.show();
            $('#addUser').setPosition().show();

        })

    },
    loadTree:function(){
        $.fn.zTree.init($("#treeDemo"), setting, zNode1);
        $.fn.zTree.init($("#treeDemo1"), setting, zNode1);
    },
    ajaxGET:function (url, data, fn,beforeSendFn) {
        var beforeSendFn = beforeSendFn || function(){};
        $.ajax({type:"GET", dataType:'json', context:this, url:url, data:data, success:fn, beforeSend:beforeSendFn});
    },
    ajaxPOST:function (url, data, fn,beforeSendFn) {
        var beforeSendFn = beforeSendFn || function(){};
        $.ajax({type:"POST", dataType:'json', context:this, url:url, data:data, success:fn, beforeSend:beforeSendFn});
    }
}
$(function(){
    configure.init()
})